package com.villaday.idf.adapter3;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.villaday.idf.R;
import com.villaday.idf.base.AbsRecyclerViewAdapter;
import com.villaday.idf.base.BaseRecyclerViewAdapter;
import com.villaday.idf.model2.Home_configurations;
import com.villaday.idf.model3.ConfigsEntity;
import com.villaday.idf.model3.DataEntity;
import com.villaday.idf.model3.HomeDetailsEntity;


public class HomeExtraAdapter extends BaseRecyclerViewAdapter<ConfigsEntity.BodyBean.TagsBean> {

    public HomeExtraAdapter(Context context) {
        super(context, R.layout.recycle_home_extra);
    }


    @Override
    public void onBindViewHolder(BaseRecyclerViewAdapter.RecyclerViewHolder holder, int position) {

        holder.bindTextView(R.id.tv_he, datas.get(position).getName());

        TextView tvHe = (TextView) holder.getView(R.id.tv_he);
        if (datas.get(position).isCheck()){
            tvHe.setTextColor(context.getResources().getColor(R.color.colorF73637));
            tvHe.setBackgroundResource(R.drawable.shape_solid_ffebeb_4);
        }else {
            tvHe.setTextColor(context.getResources().getColor(R.color.colorTextBlack));
            tvHe.setBackgroundResource(R.drawable.shape_solid_2bg_4);
        }
    }
}
